﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace xycn.pluginsupport.ControllerPlugins
{
    /// <summary>
    /// 缓存 单位秒
    /// </summary>
    public class DataCacheAttribute : System.Attribute
    {
        private int _Minutes = 60;
        /// <summary>
        /// 【缓存属性】 缓存时间 单位 分钟
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance has fields; otherwise, <c>false</c>.
        /// </value>
        public int CacheMinutes
        {
            get
            {
                return _Minutes;
            }
            set
            {
                _Minutes = value;
            }
        }       
    }

    /// <summary>
    /// 【权限属性】方法体加入此属性，访问的时候不会验证权限
    /// </summary>
    public class AllowAnonymousAttribute : System.Attribute
    {
        /// <summary>
        /// 访问此方法不需要权限验证
        /// </summary>
        public AllowAnonymousAttribute() { }
    }
}
